﻿using System.Web;

namespace FormAuthentication.Practice.Areas.Customer.Models.SignIn
{
    public class UserProvider
    {
        public static User GetUser()
        {
            if (HttpContext.Current.User.Identity.IsAuthenticated)
            {
                // The user is authenticated. Return the user from the forms auth ticket.
                return ((UserPrincipal)(HttpContext.Current.User)).User;
            }

            return null;
        } 
    }
}